<%@ page contentType="text/html;charset=UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<html>
<head>
    <title>${pageName}</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/common.css" media="all">
    <script src="${pageContext.request.contextPath}/static/css/layui/layui.js"></script>
    <script src="${pageContext.request.contextPath}/static/jquery/jquery-1.12.4.js"></script>
</head>
<%
//    String mainPage= (String) request.getAttribute("mainPage");
//    if(mainPage==null){
//        request.setAttribute("mainPage","/WEB-INF/page/forepage/carousel.jsp");
//    }
%>
<body>

<div class="head">
    <jsp:include page="${pageContext.request.contextPath}/WEB-INF/page/commonPage/navbar.jsp"/>
</div>
<div class="page">
    <div class="layui-row">
        <div class="layui-col-md3">
                <div class="back_menu">
                    <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="demo" style="margin-right: 10px;">
                       <c:forEach var="typeAndPer" items="${typeAndPers}">
                           <li class="layui-nav-item layui-nav-itemed">
                               <a href="javascript:;">${typeAndPer.key}</a>
                               <dl class="layui-nav-child">
                                   <c:forEach var="per" items="${typeAndPer.value}">
                                       <dd><a href="${pageContext.request.contextPath}/${per.url}">${per.permission}</a></dd>
                                   </c:forEach>
                               </dl>
                           </li>
                       </c:forEach>
                    </ul>
                </div>
        </div>
        <div class="layui-col-md9">
            <div class="back_body">
                <jsp:include page="${mainPage}"/>
            </div>
        </div>
    </div>
</div>
<div class="layui-footer foot">
    <jsp:include page="${pageContext.request.contextPath}/WEB-INF/page/commonPage/foot.jsp"/>
</div>
</body>

</html>
